const Sequelize = require("sequelize");
const sequelize = require("../config/database.js");
const Spot = require("./Spot");
const User = require("./User");
// 定义Favorite模型
const Favorite = sequelize.define("Favorite", {});

// 设置模型之间的关联
Spot.hasMany(Favorite);
User.hasMany(Favorite);
Favorite.belongsTo(Spot);
Favorite.belongsTo(User);
module.exports = Favorite;
